package com.tianji.learning.controller;

import com.tianji.learning.domain.vo.SignResultVO;
import com.tianji.learning.service.ISignRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: 19311
 * @CreateTime: 2025-03-28
 * @Description: 签到记录控制器
 * @Version: 1.0
 */
@Api(tags = "签到记录控制器")
@Slf4j
@RestController
@RequestMapping("/sign-records")
@RequiredArgsConstructor
public class SignRecordController {

    private final ISignRecordService signRecordService;

    @PostMapping
    @ApiOperation("签到")
    public SignResultVO sign(){
        return signRecordService.sign();
    }

    @GetMapping
    @ApiOperation("查询签到记录")
    public Byte[] querySignRecords(){
        return signRecordService.querySignRecords();
    }
}
